reftests: Add a reftest for background-repeat css property
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Tue, 8 Nov 2011 01:03:38 +0000 (02:03 +0100)
committerCosimo Cecchi <cosimoc@gnome.org>
Tue, 8 Nov 2011 17:41:35 +0000 (12:41 -0500)
https://bugzilla.gnome.org/show_bug.cgi?id=663522

tests/reftests/background-repeat.css [new file with mode: 0644]
tests/reftests/background-repeat.ref.ui [new file with mode: 0644]
tests/reftests/background-repeat.ui [new file with mode: 0644]

diff --git a/tests/reftests/background-repeat.css b/tests/reftests/background-repeat.css
new file mode 100644 (file)
index 0000000..4b51e1f
--- /dev/null
@@ -0,0 +1,30 @@
+* {
+  engine: none;
+  background-image: none;
+  padding: 0;
+  border-radius: 0;
+  border-width: 0;
+  border-style: none;
+  border-image: none;
+  border-image-width: 0;
+  background-color: rgba(0,0,0,0);
+}
+
+#no-repeat {
+  background-image: url("border-image-ball-red.png");
+  background-repeat: no-repeat;
+}
+
+#repeat {
+  background-image: url("border-image-ball-green.png");
+  background-repeat: repeat;
+}
+
+#default {
+  background-image: url("green-20x20.png");
+}
+
+#default-ref {
+  background-image: none;
+  background-color: green;
+}
diff --git a/tests/reftests/background-repeat.ref.ui b/tests/reftests/background-repeat.ref.ui
new file mode 100644 (file)
index 0000000..3a8904a
--- /dev/null
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <!-- interface-requires gtk+ 3.0 -->
+  <object class="GtkWindow" id="window1">
+    <property name="width_request">50</property>
+    <property name="height_request">60</property>
+    <property name="can_focus">False</property>
+    <child>
+      <object class="GtkGrid" id="grid1">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <child>
+          <object class="GtkImage" id="image1">
+            <property name="width_request">50</property>
+            <property name="height_request">60</property>
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="xalign">0</property>
+            <property name="yalign">0</property>
+            <property name="pixbuf">border-image-ball-red.png</property>
+          </object>
+          <packing>
+            <property name="left_attach">0</property>
+            <property name="top_attach">0</property>
+            <property name="width">1</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkImage" id="image2">
+            <property name="width_request">20</property>
+            <property name="height_request">60</property>
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="xalign">0</property>
+            <property name="pixbuf">border-image-3-balls-green.png</property>
+          </object>
+          <packing>
+            <property name="left_attach">1</property>
+            <property name="top_attach">0</property>
+            <property name="width">1</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkImage" id="image3">
+            <property name="width_request">20</property>
+            <property name="height_request">60</property>
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="xalign">0</property>
+            <property name="yalign">0</property>
+            <property name="pixbuf">border-image-3-balls-green.png</property>
+          </object>
+          <packing>
+            <property name="left_attach">2</property>
+            <property name="top_attach">0</property>
+            <property name="width">1</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkButton" id="default">
+            <property name="name">default-ref</property>
+            <property name="width_request">50</property>
+            <property name="height_request">60</property>
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <child>
+              <placeholder/>
+            </child>
+          </object>
+          <packing>
+            <property name="left_attach">3</property>
+            <property name="top_attach">0</property>
+            <property name="width">1</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>
diff --git a/tests/reftests/background-repeat.ui b/tests/reftests/background-repeat.ui
new file mode 100644 (file)
index 0000000..358187f
--- /dev/null
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <!-- interface-requires gtk+ 3.0 -->
+  <object class="GtkWindow" id="window1">
+    <property name="width_request">50</property>
+    <property name="height_request">60</property>
+    <property name="can_focus">False</property>
+    <child>
+      <object class="GtkGrid" id="grid1">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <child>
+          <object class="GtkButton" id="no-repeat">
+            <property name="name">no-repeat</property>
+            <property name="width_request">50</property>
+            <property name="height_request">60</property>
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <child>
+              <placeholder/>
+            </child>
+          </object>
+          <packing>
+            <property name="left_attach">0</property>
+            <property name="top_attach">0</property>
+            <property name="width">1</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkButton" id="repeat">
+            <property name="name">repeat</property>
+            <property name="width_request">40</property>
+            <property name="height_request">60</property>
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <child>
+              <placeholder/>
+            </child>
+          </object>
+          <packing>
+            <property name="left_attach">1</property>
+            <property name="top_attach">0</property>
+            <property name="width">1</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkButton" id="default">
+            <property name="name">default</property>
+            <property name="width_request">50</property>
+            <property name="height_request">60</property>
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <child>
+              <placeholder/>
+            </child>
+          </object>
+          <packing>
+            <property name="left_attach">2</property>
+            <property name="top_attach">0</property>
+            <property name="width">1</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>